Skip to content

feat(helm): render tool approval and the governance mode for muster - #1495

Merged
Rotfuks merged 59 commits into
mainfrom
tool-approval
Nov 30, 2026
Merged

Rotfuks merged 59 commits into
mainfrom
tool-approval

Conversation

@Rotfuks

@Rotfuks Rotfuks commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Milestones 1 to 3 are on this branch, and so are later additions: the portal's own client and muster's trusted clients (marked "after milestone 3").

Part of giantswarm/giantswarm#38902. The review record is the first comment on this PR, with an update comment for the later work and a record of the review round of 2026-11-27 (Quentin).

What does this PR do?

muster now decides Allow, Ask or Block for every tool call (giantswarm/muster, linked below). This PR makes the platform charts set that explicitly and render what muster needs.

Area What changes
governance value A map that mirrors muster's own: governance: {mode: trusted|governed, roleFloors: {role: [tools]}} (trusted default), rendered into muster's configuration; a string there (the earlier scalar) fails the render. On governed, agents are asked before every tool of a governed server that is not on its safe list. roleFloors adds floors for roles you declare, to muster's built-in ones. Below the muster floor governed fails the render.
governedServers Top-level values: per shipped MCP server its role and safe list of reads (agent-manager, model-manager, vm-manager, cluster-manager, workspace-manager, toolchain-manager, skill-manager, kagent as sessionManager, mcp-kubernetes; an installation adds its own). Named only while the component renders. prometheus and capi families are exempt (reads only). An own muster.muster.governance.governedServers entry stands for its server key.
Connectivity chart Explicit spec.approval on the two MCPServers it renders: mcp-kubernetes (rule Ask, 14 reads Allow, writes Ask) and kagent (all Allow). rule: Block is accepted.
Approval installation muster's approval.installation and the redirect allowlist the approval page may return to (portal session page, klaus-gateway's return), derived from the platform's hostnames. backstage.publicPort adds the edge port when it is not 443.
Approval binder The muster chart binds muster-approval-binder in muster's own namespace to agent-manager's ServiceAccount (name and namespace follow agent-manager). agent-manager.serviceAccount.create: false needs a name.
Per-agent approval (milestone 2) agent-manager's tool approval turns on from the floors that bind it (muster.toolApproval.enabled); the session bindings API is called on muster's own port and a NetworkPolicy admits agent-manager alone; an installation's own management server can name its reads as safe on governed; skills describe agent-manager's split update tools and set_agent_approval.
Agent chart 3.x (milestone 3) The agent chart line moves to 3.x only with agent-manager's migrate hop and muster's approval floor (a guard that reads exact pins, ranges, pre-releases and || alternatives and refuses any range that admits a major it was not checked against; the render also refuses muster's own governance below its floor). agentManager.migration.preflightSemver renders a never-started CronJob that runs migrate --dry-run against the 3.x range, with the read-only access (namespaces, organization reads) a 3.x preflight range grants the identity, so the mandatory dry run can run on the 2.x line. Migrate's write rights in organization namespaces and the admission policy that holds them render only while agentManager.migration.cutover is set on a 3.x line. The release floors are template defines, unset until the real releases exist, so every 3.x line is refused until then. UPGRADE.md and the skill describe the mandatory dry run, running Sessions and the removal of requireApproval.
Default agent (milestone 2, found by a manual test) agent-manager reads the default agent's release by name (muster.toolApproval.platformReleases, release to the Agent it renders; a Role with resourceNames), not derived with a remote target, where platformAgents carries the settings instead.
Portal client and trusted clients (after milestone 3) The portal signs in with its own OAuth client (backstage.oidcClientId, secret key portal-dex-client-secret, optional) and adds the platform client's audience to its scopes. muster.approval.trustedClients lists that client, and only it, from the new floor muster.trustedClientsFloor; any other id (the shared client, a CLI client) fails the render. From the same floor the chart renders the Role binding muster-approval-decider for the portal's ServiceAccount only and projects its token (audience muster) into the portal, so muster can check the portal's workload for inline decisions and sign-in tickets (backstage.signInHandoff, default on).
Installation specifics out The chart no longer carries anything installation-specific: the default governedServers entry for a vendor's own server is gone, and the connector-admin and workflow-editor subjects default to placeholder ServiceAccount subjects no identity provider can issue a token for. An installation names its own (governance.roleFloors, governedServers, muster.rbac.*.subjects).
Skills and docs agent-platform-tools, agent-platform-agent-management, agent-platform-building-blocks skills, docs/toolset-presets.md, chart READMEs, UPGRADE.md.
Tests tests/verify-tool-approval.py (make verify-tool-approval): governance, connector admins, binder, allowlist, overrides reaching the connectivity release, and a coverage check that fails on a shipped MCP server that is neither governed nor exempt, a floor on a safe list, or a safe entry naming no tool.

What is the effect of this change to users?

  • With the default values (trusted, muster below the floor, the agent chart on 2.x) nothing new is rendered into muster's configuration. The explicit spec.approval on the connectivity chart's MCPServers renders for any muster version; an old CRD prunes it.
  • Until muster.trustedClientsFloor is set and backstage.oidcClientId is a dedicated client, no trusted client, decider binding or projected token renders and muster's decision and ticket endpoints refuse every caller.
  • With a muster that carries tool approval: mcp-kubernetes writes ask, and on governed agents are asked before every non-read tool of the platform's management servers.

Upgrade notes

  • governance is a map now (governance.mode, governance.roleFloors); the earlier scalar fails the render.
  • Move components.muster.versionRange to the muster release that carries tool approval. governance.mode: governed below it fails the render.
  • Organizations: set agentManager.migration.cutover: true in the change that moves the agent chart line to 3.x and unset it once no organization is ChartSourceHeld; the operator holds an organization's chart source until migrate marks the organization ready.
  • The agent chart line moves to 3.x only when the release floors are set and the preflight (UPGRADE.md, mandatory dry run) is clean; chart 3.0 removes muster.requireApproval (agents move to default: Ask, agent-manager's migrate does it). Running Sessions of agents that asked keep asking.
  • After muster's CRD upgrade, force a reconcile of the releases that render MCPServers (connectivity, agent-platform-mcps, the managers) if any was applied while the old CRD was served (its spec.approval was pruned): flux reconcile helmrelease <name> -n <ns> --force. Until the CRD knows spec.approval, muster refuses every server tool.
  • Keep muster.rbac.mcpServerEditor.subjects non-empty (the chart's default is a ServiceAccount placeholder no identity provider can issue a token for; name your own connector admins, and the workflow editors the same way). muster's chart no longer binds system:authenticated and fails the upgrade with an empty list while the old binding exists (muster.rbac.mcpServerEditor.allowRemovingBinding: true drops it).
  • Replace an own muster.muster.governance.servers.<role> by governedServers entries; the render fails on the earlier shape.
  • An edge not on 443: set backstage.publicPort and remove a hand-written portal entry from muster.muster.oauth.mcpClient.postLoginRedirectAllowlist. The derived allowlist reaches muster only with muster.muster.oauth.mcpClient.enabled.
  • Asking needs muster's Valkey storage and browser sign-in (muster.muster.oauth); see muster's release note.
  • For inline approval and the sign-in handoff: create the portal's own client at the identity provider (callbacks of the portal only, the platform client's audience trusted), put its secret in portal-dex-client-secret, set backstage.oidcClientId, and set muster.trustedClientsFloor to the muster release that carries the decision API. The portal's session sees approvals inline only on its own installation.
  • Clients (portal, klaus-gateway, kagent) retry an approved call as the same client of the same person; another client of the person asks anew.

How does it look like?

Not a visual change. A governed platform renders into muster's config:

governance:
  mode: governed
  roleFloors: {}
  governedServers:
    - {server: agent-manager, role: agentManager, safe: [list_agents, ...]}

Changes from the plan

Where this PR differs from the design in the epic (giantswarm/giantswarm#38902):

  • Governed mode asks by default. The chart renders per-server safe lists (governedServers: role and safe per shipped server) and a coverage test fails on any shipped MCP server that is neither governed nor exempt, instead of exact tool-name entries.
  • governance is a map. governance: {mode, roleFloors} mirrors muster's own configuration, with governedServers beside it; the earlier scalar fails the render. Nothing was released with the scalar, so there is no shim.
  • No installation-specific defaults. No governed entry or floors for a vendor's own server; the connector-admin and workflow-editor subjects default to placeholder ServiceAccount subjects no identity provider can issue a token for. An installation names its own (governance.roleFloors, governedServers, muster.rbac.*.subjects).
  • Approval binder. The Role and RoleBinding live in muster's own namespace, and muster's review rights are narrower than system:auth-delegator (token reviews cluster-wide, access reviews in its namespace only).
  • Bindings API. agent-manager calls muster's own bindings port and a NetworkPolicy admits agent-manager alone; the main-port path is turned off.
  • rule: Block is accepted wherever the chart renders an approval.
  • Chart line. The agent chart moves to 3.x only through a guard (agent-manager and muster at their floors, one major, no pre-release or open range) instead of the platform release moving the ranges. The release floors are unset until real releases exist, so every 3.x range and governed are refused until then.
  • Organizations. The connectivity chart renders migrate's organization scope policy and write rights only while agentManager.migration.cutover is set (a boolean true; a string fails the render). The policy holds spec.values of an organization's HelmRelease and the report, and requires metadata unchanged. The operator's own PR holds an organization's source until migrate has marked it ready.
  • Floors depend on each other. Any other floor set while governanceFloor is unset fails the render, and so do governed and roleFloors while muster is not a component of the release.
  • Default agent. muster.toolApproval.platformReleases maps the default agent's release to the Agent it renders (derived from agent-manager's tool approval floor), so agent-manager can read it by name and refuses an Agent whose Flux labels name another release. With a remote target (gitops.target.kubeConfig) the default agent's settings are passed in agent-manager's own values (platformAgents), from the same values in the same render as the release.
  • Dedicated portal client. Muster trusts only the portal's own OAuth client for sign-in tickets and inline decisions, not the shared platform client, because every CLI and agent token carries that one. The chart refuses any other id in trustedClients (also an own list), and the interim handoffFloor was dropped: below trustedClientsFloor nothing renders.
  • Decider binding. The portal's ServiceAccount token (audience muster) is projected into the portal and muster checks it with a LocalSubjectAccessReview for decide; the Role is bound to that ServiceAccount only, from the same floor. An own muster.rbac.approvalDecider.subjects replaces the derived list and the token projection follows it.
  • Explicit client lists obey the floor. A non-empty trustedClients or handoffClients below trustedClientsFloor (or with the floor unset) fails the render; the lists no longer bypass the floor that gates the filled-in list.
  • Range grammar. Agent chart ranges that admit a major of 100 or more are refused; shared classifier fixtures are a follow-up.
  • Inline decision is a first-party extension, not MCP URL elicitation (see muster#1912). Strict MCP token handling is not claimed: giantswarm/giantswarm#39584.
  • Delivery. One pull request per repository carries all three milestones and the later additions, instead of one pull request per slice.

Any background context you can provide?

  • Epic giantswarm/giantswarm#38902, PRD slice 7. The component charts carry their own defaults (linked PRs); this chart owns governance, safe lists and wiring.
  • Departs from the PRD: governance by safe lists per governed server instead of exact tool names (owner decision, governed-safe-list-proposal), and Block as a rule.
  • On trusted the management servers stay Allow all, as the PRD has it; kagent's session and sandbox write tools ask only on governed.
  • Milestone 2 adds agent tool lists (tools on create_agent), update_agent_access and grants (agent-manager and the agent chart, linked below); milestone 3 the chart 3.0 move.
  • Decisions that changed behaviour: the cut-over switch for migrate's organization writes; floors that need the governance floor; the default agent's release lookup; the release floors are unset until real releases exist (nothing is pinned to a placeholder 3.x range); governance as a map, nothing released so no shim; the migrate preflight reads organization namespaces only on a 3.x line.
  • Merge after the muster release and set the floor first (see reviewers).

Related pull requests (milestones 1 to 3)

Repository PR Role
muster giantswarm/muster#1912 enforcement, approval page, governance, agent settings and grants
backstage giantswarm/backstage#3655 portal: connector and agent tool settings, session prompt, inline approval card
klaus-gateway giantswarm/klaus-gateway#618 Slack prompt and return
agent-manager giantswarm/agent-manager#483 chart default, per-agent approval settings and grants, migrate 2.x to 3.x
model-manager giantswarm/model-manager#462 chart default
vm-manager giantswarm/vm-manager#264 chart default
cluster-manager giantswarm/cluster-manager#359 chart default
workspace-manager giantswarm/workspace-manager#229 chart default
toolchain-manager giantswarm/toolchain-manager#100 chart default
skill-manager giantswarm/skill-manager#48 chart default
agent-platform-mcps giantswarm/agent-platform-mcps#108 chart defaults for the families
agent giantswarm/agent#143 agent chart 3.0: tools and default, requireApproval removed
agent-skills giantswarm/agent-skills#90 agent management skill
agent-platform-operator giantswarm/agent-platform-operator#74 organization chart source follows the configuration
giantswarm-platform-manager giantswarm/giantswarm-platform-manager#1053 governance as a typed input, second-person review
agentlab giantswarm/agentlab#1355 lab: governed mode docs, the portal's Dex client, the portal's workload token

What is needed from the reviewers?

  • Read the review record first.
  • Before merge: the release floors in _helpers.tpl (agent-platform.muster.governanceFloor, agent-platform.muster.trustedClientsFloor and the floors for agent-manager's tool approval, the agent chart 3.x line, the session bindings port and the agent approval) are unset, so tool approval and the 3.x line are refused at render. Set each to the release that carries it when those releases exist.
  • Judge that management servers stay Allow all on trusted.
  • The branch was reviewed in full: the milestone 1 fix round and the later commits in delta reviews and a last review, milestone 3's slice 8 (1 blocker, 5 major, all fixed in 5ad19d1b..e5bee96e) with a re-check, the organization cut-over in three Fable passes. Not independently re-checked: 7749f52e (fixes of the delta review) and 5d705d14 (the fix for the last review's medium finding). Open findings (L-08, D-CP-06) are minor and listed in the record. After that, a security review of the inline path and a last check (second model; update comment in the review record) covered b430dbf4, be57118d and c6d0c775; not independently re-checked: 018d14de (LC-03) and the docs commit fcd8f8c5. Open from that check: LC-13 (minor) and LC-16 (nit).
  • Review round of 2026-11-27 (Quentin): QB-07 fixed in 9493705c, QB-12 in 7167a7fa, independently re-checked; see "Review record — Quentin's review". Tip 7167a7fa.

Testing

Check Result
make verify-tool-approval ok (all sections)
make verify-wiring, verify-labels, verify-workspace-storage, verify-session-retention, tests/verify-schema-symmetry.py ok
helm lint of the meta and connectivity charts ok
Default meta and connectivity renders byte-identical to 9270b56e (before the fix round); the review found them byte-identical to the fork point
Coverage check mutation-checked: a shipped server neither governed nor exempt fails

Helm v4.3.2 was used; CI pins v3.17.3, so golden diffs were compared with diff -B; the goldens were later run with the pinned Helm 3.17.3 (make golden-update, verify-target, verify-modes) and the only diff is the new empty musterSessionBindingsNamespace default. The reviewers ran make verify-tool-approval and make verify-agent-chart-line at 2739b10d, 775a52aa, be00ba2f and d6423abb, and verify-organization-namespaces (84 of 84 cases on envtest 1.37, through a stand-in for PyYAML) at be00ba2f. Not run: 90 of the 132 verify-* targets (they need PyYAML and Python 3.10, including verify-skills, verify-meta stops at verify-mirrored-values.py), helm unittest, the network targets. Agentlab re-test, 2026-11-25 (lab-tests/m1-retest.md): passed, no blocking defects; it ran with this chart at 5d6e6f37; the tip is now 5d705d14. The real-browser check of the approval page is still pending.

Milestone 2 lab (2026-11-26, lab-tests/m2-integration.md) ran with this chart at 0d059eed: bring-up exit 0, the grants namespace created, platform-test passed. Milestone 3 lab (lab-tests/m3-integration.md) ran at ffeb04c8 with the floors set by hand in the lab worktree: the 3.x move ran, migrate rewrote the agents, a running Session asked across it, the line guard refused the bad ranges (>=3.0.0, 3.0.0-rc.6, >=2.6.0 <=3.0.0-rc.1, ~2.6 || 3.x, >=3.0.0 <4.0.0 || 6.x) and the committed chart with unset floors refused every 3.x line; platform-test 17 PASS. Found and fixed afterwards: the dry run's RBAC rendered organization reads only on a 3.x line (M3I-1; the migrate preflight and the docs now give a runnable dry run, 8e2f0b40, 624f1b8a). The later commits (e48616a0, b39fe677, governance as a map) are not lab-tested. A fourth check (default agent session start, 2026-11-26) ran with the _helpers.tpl hunk of 03a17f49 on top of the lab floors: the Role for the platform's release was rendered and agent-manager could read it. Never run: the remote-target path (d6423abb), 5d705d14, the cut-over and the organization scope policy on a cluster, a cluster upgrade path.

Later work (2026-11-26): the lab ran this chart at b430dbf4, be57118d and c6d0c775 with the floors set by hand in a lab worktree (the portal's client token carries the right azp and audience; trusted client and decider binding render as intended; platform-test passed after each). Last check (second model, c6d0c775): make verify-tool-approval passes, 7 mutants (6 killed, 1 equivalent). 018d14de (handoffFloor dropped): the check fails on the old chart; make verify-all passes except verify-hooks-secrets, which fails identically without the change (substrate bootstrap hook in envtest). Not run: a real installation with the floors set, the projected token in a running in-cluster portal.

Review round 2026-11-28 (9493705c, 7167a7fa, docs d2ff7f77): new cases in verify-agent-chart-line and verify-tool-approval, both green in the independent re-check.

Checklist

  • Make sure values.yaml and values.schema.json are valid.
  • A new or materially changed serving preset states its kubernetes-cka-v2 mean score and range and links the committed result (docs/serving-presets.md). Not applicable: no serving preset changes.

…onfiguration

governance (trusted, the default, or governed) is the platform's governance mode for tool calls (giantswarm/giantswarm#38902). The meta chart renders it into the muster release as muster.governance (the mode and the servers muster treats as agent-manager and the Platform Manager) from the muster release that reads it (agent-platform.muster.governanceFloor), and holds it back from the connectivity release. An unknown mode or an own muster mode that differs fails the render. The values document muster's mcpserver-editor binding as the connector-admin role.
…PServers

mcp-kubernetes ships the Recommended settings (read-only tools Allow, the rest Ask, rule Ask), kagent's session tools Allow all (rule Allow, every tool Allow), each a value (mcp-kubernetes.mcpServer.approval, kagent.controllerRoute.mcp.approval) rendered as spec.approval and validated against the CRD's enums, failing naming the key.
…ount

muster takes an agent's tool settings in a Session binding only from a sender allowed to bind toolapprovals in its namespace. The muster chart ships the Role; the connectivity release binds it to agent-manager's ServiceAccount, and only to it.
The chart README names governance, the connector-admin role, the binder and each shipped connector's approval value; README and the toolset presets link the Governing tool calls page.
From the muster floor that reads governance, the meta chart sets
muster.approval.installation from backstage.installationName and adds the
portal's /sessions and klaus-gateway's /auth/slack/return to
muster.oauth.mcpClient.postLoginRedirectAllowlist. Mark the governance floor as
one placeholder value.
…y MCPServers

muster accepts Block as spec.approval.rule: tools without their own entry, new ones included, are hidden and refused. The comments say what governed platforms ask on kagent and mcp-kubernetes and that the kubernetes aliases follow the rule.
… the approval binder in muster's namespace

muster's new governance shape: governance.governedServers {server, role, safe} for every MCPServer the platform ships (top-level governedServers, keyed namespace/name outside muster's namespace), on trusted too so the role floors hold. governed below the muster floor and the earlier servers shape fail the render. muster.rbac.approvalBinder.subjects names agent-manager's ServiceAccount (the muster chart binds it in muster's namespace); the connectivity chart's own RoleBinding is gone, and an unnamed ServiceAccount the chart does not create fails. The redirect allowlist keeps a non-default port (backstage.publicPort, klaus-gateway's callbackBaseUrl as written) and refuses an invalid callbackBaseUrl; NOTES say when mcpClient.enabled is off. README: Block rule, governed servers, MCP-session retry, upgrade notes.
…rted redirect entries

verify-tool-approval fails on a shipped MCPServer that is neither governed nor in governanceExempt, a floor on a safe list, a safe entry naming no tool of its server and differing kubernetes maps; it asserts a non-default port in both redirect entries (M1-1), invalid ports and URLs, the binder subjects, meta-to-connectivity overrides and the Block rule. The governance floor placeholder marker is now optional.
…er the same MCP session and the upgrade

The skills no longer present agent-manager's per-agent tool lists (update_agent_access, set_agent_approval, tools on create_agent) as shipped: they apply once its schema has them. approval.source lists what muster reports (unavailable included). UPGRADE.md names the operator actions for tool approval.
…otated

A safe entry whose name starts with a write verb (create, delete, exec, set, approve, ...) fails verify-tool-approval unless a '# safe-write: <tool>: <reason>' comment above safe: says why it reads. Also covers publicPort 65535, 65536 and 99999.
@circleci-architect

circleci-architect Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Published Helm chart agent-platform

4.187.1-r27740a5ft20261130185723h31f5290
Chart agent-platform
Version 4.187.1-r27740a5ft20261130185723h31f5290
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/agent-platform:4.187.1-r27740a5ft20261130185723h31f5290
Digest sha256:41b2b661318b4821e640386502fb137eae6834614e299c88233e328360cb8522
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent-platform --version 4.187.1-r27740a5ft20261130185723h31f5290

Posted by architect-orb · build 36346 · commit 31f5290 · updated in place on every push

@circleci-architect

circleci-architect Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Published Helm chart agent-platform-connectivity

4.187.1-r27740a5ft20261130185723h31f5290
Chart agent-platform-connectivity
Version 4.187.1-r27740a5ft20261130185723h31f5290
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/agent-platform-connectivity:4.187.1-r27740a5ft20261130185723h31f5290
Digest sha256:2b0eb28dfaafad8a0b250d3ff40cb7a9862914e86cb53d9a2807e69a9e6cb38b
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent-platform-connectivity --version 4.187.1-r27740a5ft20261130185723h31f5290

Posted by architect-orb · build 36349 · commit 31f5290 · updated in place on every push

…t bind it

agent-manager's muster.toolApproval.enabled follows muster: on from the
agent-manager floor whose chart takes the key and muster's agent approval
floor (both placeholders until released), off below muster's, an own value
standing. The agent-management skill names toolSettings,
list_approval_grants and update_agent_access for connectors, and drops a
leftover sentence.
…t only it for muster's sign-in handoff

backstage.oidcClientId gives the portal a client of its own at the platform's
issuer (secret: portal-dex-client-secret of global.identity.existingSecret,
mounted optional as AGENT_PLATFORM_PORTAL_OIDC_CLIENT_SECRET). The portal then
also requests the platform client's audience, so muster, the managers and the
API server accept its tokens as before; their azp names the portal's client.

With such a dedicated client and backstage.signInHandoff on (the default),
the meta chart lists that client, and only that one, in muster's
approval.handoffClients from agent-platform.muster.handoffFloor (unset until
the muster release exists): a click on Open in portal chat then opens muster's
approval page or connector sign-in signed in. The shared client is never
listed; an own handoffClients naming it fails the render, since agents'
delegations and CLIs hold its tokens. The trade-off (a holder of a person's
portal token can open that person's approval page without a browser sign-in;
the decision still takes the click on muster's page) is documented in
docs/authentication.md.
…roval decisions

muster renamed approval.handoffClients to approval.trustedClients: the
clients listed there decide a person's approvals inline (POST
/approvals/{id}/decision with the person's token) and get sign-in handoff
tickets. The chart lists the portal's dedicated client as trustedClients
from the new floor agent-platform.muster.trustedClientsFloor (unset until
that muster is released), and as handoffClients from handoffFloor below
it. An own list under either name stands; naming the shared client fails
the render. Docs, the tools skill and verify-tool-approval follow.
…ns and trust only its dedicated client

From agent-platform.muster.trustedClientsFloor, while muster trusts the
portal's client, the muster release binds muster-approval-decider (verb
decide on toolapprovals) to the portal's ServiceAccount and nothing else
(muster.rbac.approvalDecider.subjects, an own list stands), and the
backstage release projects that ServiceAccount's token for audience
muster at /var/run/secrets/muster.giantswarm.io/serviceaccount/token,
beside its own extra volumes. muster takes a person's portal token on its
decision API and handoff endpoint only with that workload token.

muster.approval.trustedClients and handoffClients may name only the
portal's dedicated client: any other id fails the render (the shared
client as before, and now dex-k8s-authenticator, the kagent UI's or
klaus-gateway's client, a CLI's), in an own list as well.
…he trusted-clients floor

Drop agent-platform.muster.handoffFloor and its handoffClients branch: a
muster below the trusted-clients floor issues handoff tickets without the
workload review and the sign-in confirmation, and must not be trusted with
them. An own list under either name still stands.
@Rotfuks

Rotfuks commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review record — update

Part of giantswarm/giantswarm#38902. Covers only what is new since the record above (tip 5d705d14). Branch tool-approval is now 50 commits on ba4f5fca, tip fcd8f8c5. 5 commits since: b430dbf4, be57118d, c6d0c775, 018d14de, fcd8f8c5.

Read this first

  • New since the record: the portal signs in with its own OAuth client (backstage.oidcClientId, b430dbf4); muster.approval.trustedClients from the new floor muster.trustedClientsFloor (be57118d); the decider Role binding for the portal's ServiceAccount, the projected workload token and the dedicated-client guard (c6d0c775); the interim handoffFloor dropped (018d14de); docs condensed (fcd8f8c5).
  • Independently reviewed (Claude Fable 5.2): a security review of the inline path (chart PoC on a scratch copy at be57118d), then a last check of everything after 5d705d14. 0 critical, 0 high.
  • Not independently re-checked: 018d14de (LC-03; verify-tool-approval fails on the old chart) and fcd8f8c5 (docs only).
  • Not run by anyone: a real installation (all lab runs used a dirty umbrella with lab floors set; the committed chart renders no trusted client, no decider binding and no projected token until the floors are set), the projected token in a running in-cluster portal. make verify-all passes except verify-hooks-secrets, which fails identically without the change (substrate bootstrap hook in envtest).

Review rounds

# Round Scope Reviewer Kind Result
28 Lab: sign-in handoff, inline approval, final rollout b430dbf4, be57118d, c6d0c775 through the lab umbrella tester lab dedicated client's token carries the right azp and aud; trusted client and decider binding rendered as intended; platform-test exit 0 after each rollout
29 Security review, inline path be57118d (chart PoC, 6 cases with test floors) Claude Fable 5.2, independent security IA-06 (low); fails closed below the floors, with the shared client, with signInHandoff: false, with the portal off
30 Fix c6d0c775 implementer fix IA-06 fixed
31 Last check 5d705d14..c6d0c775; make verify-tool-approval; 7 mutants (6 killed, 1 equivalent) Claude Fable 5.2, independent code and security 0 critical, 0 high; LC-03 (low [sec]), LC-13 (minor), LC-16 (nit)
32 Fix 018d14de implementer fix LC-03 fixed
33 Docs fcd8f8c5 implementer docs condensed, no code

Findings that changed this repository

ID Severity Title Outcome Re-check
IA-06 low [sec] the guard knew one client that must not be trusted fixed in c6d0c775: every entry of trustedClients and handoffClients must be the portal's dedicated client; any other id fails the render (cases from the review's PoC in verify-tool-approval.py) verified (last check)
LC-03 low [sec] from handoffFloor up to trustedClientsFloor the chart rendered handoffClients for a muster that issues tickets without the workload review fixed in 018d14de: handoffFloor and its branch dropped; below trustedClientsFloor nothing renders; check asserts no floor renders handoffClients not re-checked

Open items

ID Severity What is open
LC-13 minor An own muster.rbac.approvalDecider.subjects empties the derived list and the projected token hangs on that list: naming the portal's ServiceAccount yourself gives the binding and no token, so every inline decision is refused (fails closed, no hint); an own list is not checked
LC-16 nit A comment in _helpers.tpl cites the review

# Conflicts:
#	UPGRADE.md
#	skills/agent-platform-agent-management/SKILL.md
#	skills/agent-platform-tools/SKILL.md
@QuentinBisson

Copy link
Copy Markdown
Contributor

Review supplement for giantswarm/giantswarm#38902

Reviewed head: d2ff7f77047cfe9d3401f26d0b7873ecbcf353a1 (rechecked unchanged). Compared the epic, linked PRD and subsequent design decisions with the implementation and existing local review record. Focus: governance/safe-list wiring, release floors, binder/decider RBAC, portal identity/token projection, migrations, chart values/schema and selected assertions. This supplements those reviews; it does not claim to rerun their tests or independently verify every generated fixture/test assertion.

Spec

Scoped independent cross-repository checks support the governance, connector-admin and compatibility design. Unset release floors are a documented release prerequisite, not evidence that deployed enforcement already works.

This is a scoped contract assessment, not an exhaustive numbered acceptance score. Independent focused specification cross-checks covered the core enforcement/client contracts and platform/manager integration. Declared follow-ups and accepted design changes are not counted as new defects.

Blocking

No new blocking code finding established in this pass.

Non-blocking

None newly established.

Suggestions

  • Cover explicit trusted-client overrides below the capability floor. The approval helper merges explicit trustedClients/handoffClients before gating only the automatically populated list. Today the unset outer governance floor suppresses the whole block, so this is not a current exploit. When pinning releases, either enforce the trusted-client floor for explicit lists too or document/test why the chosen floors cannot expose an older handoff implementation. Existing below-floor assertions exercise automatic population.

Deep verification

Aspect Status Evidence / limit
Problem confirmed on base n/a: feature slice The diff introduces the approval-related contract reviewed here; no claim of a locally reproduced base failure.
Fix addresses named root cause covers inspected scope Relevant changed paths traced against the scoped requirement.
Spec criteria met qualitative; no exhaustive score See Spec above.
Tests pin the contract static evidence Release-floor, governance coverage, source namespace, chart-major and trusted-client assertions inspected selectively.
Correct (edge cases) no additional defect established Inspected changed contracts and cross-repository dependencies; not a proof of all interleavings.
Standard mechanism existing patterns used Helm/Flux, Kubernetes TokenReview and authorization bindings; PRD governance and approval terms.
Standard names sourced MCP/Kubernetes identifiers and PRD terminology; no new naming finding.
Security boundaries static review only Dedicated portal client plus projected workload identity, restricted binder/decider subjects and namespace policies inspected.
Simplest fix retain approach Keep centralized chart wiring and pin actual compatible releases together before rollout.
Reuse check no new duplication finding Existing surrounding helpers/patterns inspected within the stated scope.
CI checks green reported checks / skips See CI note below.
Pipeline gates unverified locally PR code execution prohibited in this session.
Findings 0 blocking / 0 non-blocking / 1 suggestions Findings above supplement the existing review record.
Merge danger one-way door platform-wide policy and migration/source cutover.

Reported checks passed or were skipped; no failed/cancelled check to triage. A skipped job is not evidence that its gate ran.

Unverified locally: applicable builds, tests (including race/integration/envtest), vet, formatting/lint/pre-commit, generators, Makefile verification targets, Helm rendering/schema/unit checks, and browser/live-cluster flows. No PR code was executed. GitHub-reported CI provides supporting evidence, not a local reproduction. Large test, fixture and documentation changes were inspected selectively; this is a focused deep review of the contracts above, not exhaustive line-by-line coverage.

Recommendation: merge as-is within this review's scope, subject to existing release-order/rollout prerequisites and previously documented open items. This is not sign-off on production cutover: actual compatible release pins and the documented organization/remote-target rollout evidence remain required.

Team context: none.

@QuentinBisson

Copy link
Copy Markdown
Contributor

Protocol integration and reuse follow-up

Reviewed d2ff7f77047cfe9d3401f26d0b7873ecbcf353a1.

Non-blocking: give the three chart-major classifiers one explicit contract. The Go classifiers in agent-manager and operator, and the Helm helper, duplicate finite-probe range classification with different limits. For >=100.0.0 <102.0.0, the Go code derives only 100 (missing admissible 101), while Helm emits none. This is a source-derived example, not an executed test, and does not affect the current 2→3 migration. Avoid presenting the functions as general equivalent semver classifiers: constrain and document the supported grammar/range, reject unsupported inputs, and share conformance fixtures across all three consumers. Masterminds/semver already supplies matching, but Check alone does not prove which majors a range intersects. A new service or broad abstraction is unnecessary.

Protocol qualification: the separate portal OAuth client and projected Kubernetes workload credential establish the intended first-party approval boundary. They do not alone prove strict MCP OAuth conformance: the deployed MCP resource must still receive access tokens intended for itself, per MCP Token Handling. The inherited forwarded-ID-token compatibility mode needs an explicit deployment profile. The inline portal decision flow is also a bespoke trusted API, not the opaque standard URL-elicitation path.

The platform chart's role is composition and release gating; muster remains the enforcement authority. Keeping vendor-specific governance configuration here/GPM and generic enforcement in OSS components is a sensible boundary. The existing release-floor and live-cutover prerequisites remain; no broad DDD abstraction or new service is recommended.

Verification: static source and published-spec review only; no PR code executed. Local builds, tests/race tests, lint, Helm gates, browser flows and independent-client interoperability remain unverified. Heads were rechecked unchanged. This supplements the earlier deep-review verdict and does not clear its blockers.

…t 99

Document the range grammar agent-platform.agentChart.majors reads and refuse
a line that admits an agent chart major of 100 or more as unsupported, as
agent-manager's migrate and the agent-platform-operator do.
@Rotfuks

Rotfuks commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Review record — Quentin's review

Part of giantswarm/giantswarm#38902. Answers the review of 2026-11-27 (comments below). Branch tool-approval tip 7167a7fa; since the last record (fcd8f8c5): d2ff7f77 (docs moved into the repository), 9493705c, 7167a7fa (plus a merge of main, 9f88c41d).

ID Point Outcome
QB-07 Chart-major classifiers differ on range limits small version in 9493705c: ranges admitting a major of 100 or more refused, case in verify-agent-chart-line. Shared fixtures stay a follow-up
QB-12 Explicit trustedClients/handoffClients lists skip the floor fixed in 7167a7fa: a non-empty explicit list below the floor (or with the floor unset) fails the render; an own empty list renders none; case in verify-tool-approval
QB-13 Inline decision is not MCP URL elicitation accepted: first-party extension, documented in muster (muster#1912); sentence added to this PR body
QB-14 Forwarded ID-token path is not strictly MCP token-handling compliant accepted as pre-existing, out of scope; strict compliance is not claimed. Follow-up: giantswarm/giantswarm#39584

Independent re-check

Claude Fable, 2026-11-28, detached worktree at 7167a7fa, read-only, fixes reverted in turn.

ID Verdict Evidence
QB-07 done, small version mutation fails verify-agent-chart-line
QB-12 fixed mutation fails verify-tool-approval

verify-agent-chart-line and verify-tool-approval green.

Open items

ID Severity What is open
N-6 info with trustedClientsFloor unset (its state on the branch) any non-empty explicit list fails the render: intended, fail closed. A hand-set explicit list needs the floor patch applied
QB-07 follow-up shared classifier fixtures

@Rotfuks

Rotfuks commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

@QuentinBisson thanks for the thorough review (your comment). Addressed: QB-07 fixed in 9493705c, QB-12 in 7167a7fa. QB-13 is now stated in the PR body. QB-14 is not claimed here and tracked in giantswarm/giantswarm#39584.

Details and the independent re-check are in the review record.

Main raised the muster floor to 5.67.0-rc.19, above verify-tool-approval's
test floors: they move up five minors so the default render stays below
them. The tools skill carries both sides' changes as 3.5.0.
@Rotfuks
Rotfuks marked this pull request as ready for review November 30, 2026 08:36
@Rotfuks
Rotfuks requested a review from a team as a code owner November 30, 2026 08:36
@Rotfuks

Rotfuks commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — merge round

Part of giantswarm/giantswarm#38902. Reviewer: Claude Fable 5.2, independent of the implementing and merging model, read-only, verdicts formed from the code. Full review: reviews/final/merge-round-2-review.md in the epic's workspace.

Covers the merge of main fa31efe8 (conflicts in UPGRADE.md, the chart README, skills/agent-platform-tools/SKILL.md, tests/verify-tool-approval.py). Result: no findings.

  • UPGRADE.md keeps both sections; the README's omitKeys rows match values.yaml in order; the skill carries both sides' text as 3.5.0.
  • verify-tool-approval.py: the test floors moved to 5.70.0, 5.71.0 and 5.74.0 with every range in the file, so the default render (muster >=5.67.0-rc.19) stays below each. All 17 checks pass.
  • The chart's real floors are still unset, so main's higher muster floor turns nothing of tool approval on.

Run: tests/verify-tool-approval.py against both charts (pass). Not run: golden renders (pinned Helm); CI at the tip passes.

An own muster.rbac.approvalDecider.subjects list, which an installation
sets for a portal deployed as its own release (components.backstage off),
now fails the render for any subject other than a ServiceAccount: a bound
group or user could approve for any person whose token it holds. The test
covers such a portal: an own decider list and trustedClients list stand,
and the platform projects no token.
…oken

Where the platform projects the portal's workload token for muster, the
portal chart's own projection (backstage.backstage.musterWorkloadToken) or
an own volume or mount of that name fails the render instead of a pod
declaring it twice. The tests add mixed decider lists, an entry without a
kind, and the same with the portal on.
@Rotfuks

Rotfuks commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — portal workload token

Independent code and security review by Claude Fable 5.2 of e13abf41, then fix verification of f4c0b3f0. make verify-tool-approval: verified.

Result after the fixes: 0 blocker, 0 high, 0 medium, 0 low, 2 info. First round: 2 low (1 security).

Holds: the ServiceAccount-only guard runs before every other condition of the helper, with the portal on or off. An own trusted-client list must equal backstage.oidcClientId and differ from the shared client, also for a portal that is its own release; nothing else derives from that key while the portal component is off. No Giant Swarm specifics in the helper, the doc or the test.

  • PT-05 (closed, in muster 573ab9fa): muster's own chart now refuses any decider that is not a ServiceAccount with name and namespace.
  • PT-07 (closed): where the platform projects the token, the portal chart's own projection or an own volume or mount of that name fails the render.
  • PT-08 (closed): mixed lists and an entry without a kind are tested, with the portal on and off.
  • Info: the platform manager now writes the trusted client for a portal that is its own release (PT-01); the client is shared by every portal on that Dex, so the separation rests on the workload token.

@fiunchinho

Copy link
Copy Markdown
Member

One line that the split makes stale: skills/agent-platform-agent-management/SKILL.md:76 still says "The agent tools drop an unknown key without an error". From giantswarm/agent-manager#483 (v4.1.0-rc.1), update_agent, update_agent_access, set_agent_approval and validate_agent are registered with addStrict and refuse an argument they do not declare; create_agent still drops one. Since agent-manager 4.0.x still drops it everywhere, a version gate like the one at line 101 fits, for example: "create_agent drops an unknown key without an error; from agent-manager 4.1.0, update_agent, update_agent_access, set_agent_approval and validate_agent refuse it (before it, every agent tool drops it)".

# Conflicts:
#	helm/agent-platform/README.md
#	helm/agent-platform/values.yaml
@Rotfuks
Rotfuks merged commit 48a5ad9 into main Nov 30, 2026
18 checks passed
@Rotfuks
Rotfuks deleted the tool-approval branch November 30, 2026 19:14
@Rotfuks

Rotfuks commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — release floors

Merge 2b5ef10d and the floors commit 31f52905 checked by Claude Fable 5.2, read-only: 0 blocker, 0 high, 0 medium, 2 low (1 security), 2 info. Nothing needs a fix release. make verify-tool-approval, verify-agent-chart-line, verify-target, verify-cluster-manager, verify-workspace-manager, verify-chatgpt-personal-login, verify-range-ceilings and verify-prereleases pass. verify-meta (the goldens) was not run: PyYAML is missing on the review machine; the golden diff was read instead and shows only the new wiring and the moved ranges.

Test changes, none weakens a behaviour check:

  • verify-tool-approval.py: the dropped check ("values.yaml repeats the governance floor") guarded where the number lives, not behaviour, and cannot hold once muster's default range starts at the floor. The test floors now replace every floor in the chart copy (exactly one substitution each, stricter than before) and stay above the default ranges (agent-manager 4.6.0), so the below-floor cases still mean something.
  • verify-agent-chart-line.py: the pre-release ordering is correct semver precedence, and a floor at or below the last release without the feature (5.67.0-rc.60, 4.0.1) still fails. The below-floor refusals now set older ranges explicitly and keep asserting the refusal text; a positive case for the 3.x line at the default ranges is new.
  • verify-cluster-manager.py, verify-workspace-manager.py: exactly one governedServers entry is asserted when the component is on and none when off, then the rest is compared as before.
  • verify-target.py: the expected placement now covers agent-manager's namespace in the session bindings and the approval binder. The platformReleases/platformAgents block is left out of this comparison; verify-tool-approval.py asserts it for the remote target.
  • verify-chatgpt-personal-login.py: the muster values render against the 5.67.0-rc.61 chart, which validates the new keys; the 5.52.5 refusal case stays.

Conflicts: omitKeys is the union of both sides (the three governance keys and credential-api), in the same order in values.yaml and the README.

Findings:

  • FL-01 (low, sec): componentFloorAtLeast drops the pre-release of the range's floor (_helpers.tpl:1900-1903). Confirmed with helm template: components.muster.versionRange=5.67.0-rc.19, or a range ending below rc.61, still gets the approval block, the governance configuration, the session bindings port, the binder and agent-manager's toolApproval.enabled: true. It needs an explicit override to an older candidate; the default range and any open range resolve to rc.61 or later. Against such a muster the chart's schema (read on muster's main before the merge) refuses the new rbac keys, so its release stops upgrading and agent-manager binds settings muster does not take: closed, not open. Not checked against a pulled older chart: whether governance.mode: governed with agent-manager and the portal off, where no rbac key renders, is refused or silently ignored. It stays after the floors move to 5.67.0. Fix with the next release: compare the pre-release, as agent-platform.agentManager.installationModelsFloor does, and add a test with a candidate below the floor.
  • FL-02 (low): the unset-floor guards no longer run. check_unset_floors_keep_everything_off returns at once now that every floor is set, and the unset branches of verify-agent-chart-line.py are dead. The helpers still carry the empty-floor paths. Run both on a chart copy with the floors emptied.
  • Info: a candidate floor makes agent-manager, klaus-gateway, vm-manager and agent-platform-mcps follow release candidates in this chart; the stable release PR moves them back. The squash on main was not compared: no fetch in this review.

teemow added a commit that referenced this pull request Dec 1, 2026
…ekeeper

* origin/main:
  fix(credential-api): route through giantswarm-default when no Gateway is named (#1549)
  feat: trust the platform's GitOps namespace with the approval settings of the agents rendered there (#1548)
  feat(credential-api): install credential-api 0.2 (#1547)
  feat(vm-manager): vm-manager is an OAuth resource server always from 0.30.0-rc.23: the removed switches are gone from its block, its egress opens the identity provider, and the metrics agent scrapes /metrics with the chart's token (#1546)
  chore(deps): update cimg/python docker tag to v3.15.2 (#1543)
  fix(vm-manager): the guests' egress never reaches the cluster's networks, link-local or the WireServer, and no value opens every destination (#1531)
  test(ats): install the Gateway API CRDs from the fleet's gateway-api-crds chart on gsoci instead of github.com, which refuses CI runners' release downloads (#1544)
  fix(agent-manager): fit the migrate CronJob names and run migrate with agent-manager's own release (#1545)
  feat(helm): render tool approval and the governance mode for muster (#1495)
  chore(deps): update dependency pyyaml to v6.0.4 (#1542)
  fix(klaus-gateway): check the A2A exchange audience for muster's public URL (#1541)
  feat(agent-manager): fill mcp-oauth's values layout and reach its trusted issuers (#1540)
  ci: install PyYAML from PyPI instead of apt (#1539)
  docs(skills): explain sign-in for pinned-OAuth connectors that answer anonymously (#1536)
  fix(kagent): derive the controller audiences while oauth2-proxy is enabled (#1538)
  feat: add opt-in credential-api integration on 0.1.0 (#1535)
  feat(klaus-gateway): route A2A through agentgateway (#1511)
  feat(cluster-manager): fill mcp-oauth's values layout and reach its trusted issuers (#1512)
  feat(connectivity): audit organization RemoteMCPServers that bypass muster (#1534)
  chore(deps): update gsoci.azurecr.io/giantswarm/alpine-k8s docker tag to v1.37.3 (#1532)

# Conflicts:
#	UPGRADE.md
#	helm/agent-platform/examples/customer-bom.yaml
#	helm/agent-platform/templates/_helpers.tpl
#	tests/verify-components-charts.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants